package jsyf.oa.entity.forms;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by 92852 on 2018/6/23.
 */
@Entity
@Table(name = "T_FORMS_FIELDS", schema = "oa", catalog = "")
public class FormsFieldsEntity extends BaseEntity implements Serializable {
    private String mainId;
    private String compId;
    private String description;
    private String prompt;

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getCompId() {
        return compId;
    }

    public void setCompId(String compId) {
        this.compId = compId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPrompt() {
        return prompt;
    }

    public void setPrompt(String prompt) {
        this.prompt = prompt;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("COMP_ID", getCompId());
        obj.put("DESCRIPTION", getDescription());
        obj.put("PROMPT", getPrompt());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_FORMS_FIELDS";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("COMP_ID", "compId");
        obj.put("DESCRIPTION", "description");
        obj.put("PROMPT", "prompt");
        return obj;
    }
}
